package model.beans;

import java.io.Serializable;
import java.text.DecimalFormat;

public class ShoppingCartItemBean implements Serializable{
	
	private static final long serialVersionUID = -1469405875088109111L;
	private ItemBean item;
	private int quantity;		
	private double extendedPrice;	
		
	/**
	 * @return the item
	 */
	public ItemBean getItem()
	{
		return item;
	}
	/**
	 * @param item the item to set
	 */
	public void setItem(ItemBean item)
	{
		this.item = item;
	}
	/**
	 * @return the quantity
	 */
	public int getQuantity() {
		return quantity;
	}
	/**
	 * @param quantity the quantity to set
	 */
	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	/**
	 * @return the extendedPrice
	 */
	public double getExtendedPrice() {
		DecimalFormat df = new DecimalFormat("#0.00");
		return Double.valueOf(df.format(this.quantity * this.item.getPrice()));
	}
	
	
}


